<template>
	<view class="route-playorder">
		<view class="content">
			<view class="yuyue">
				<view class="yuyue-left">
					<view class="">
						<view class="" v-if="!pstime">
							{{`立即${tiqi===1?'配送':'自提'}，约${lijiTime}可取`}}
						</view>
						<view class="" v-else>
							{{`预约${tiqi===1?'配送':'自提'}-${pstime}`}}
						</view>


					</view>
					<view class="desc">
						为减少接触，降低风险，推荐使用无接触配送
					</view>
				</view>
				<view class="yuyue-right" @click="handleShowTime" v-if="!pstime">
					预约时间
				</view>
				<view class="yuyue-right" v-else @click="lijipeisong">
					立即配送
				</view>
			</view>


			<view class="address">
				<view class="address-left" v-if="tiqi===1" @click="handleGoselectAddress">
					<view class="have" v-if="address">
						<view class="address-item">
							<view class="address-itemLeft">
								<u-icon name="map-fill" color="#999" size="18"></u-icon>
							</view>
							<view class="address-itemRight">
								<view class="name">
									{{address.name}} {{address.phone}}
								</view>
								<view class="desc">
									{{address.area}}{{address.menpai}}
								</view>
							</view>
							<view class="address-itemIcon">
								<u-icon name="arrow-right" color="#2E2D2D" size="14"></u-icon>
							</view>
						</view>
						<view class="">

						</view>
					</view>



					<view class="none" v-else>
						<view class="">
							<u-icon name="plus" color="#2E2D2D" size="18"></u-icon>
						</view>
						<view class="text">
							添加收货地址
						</view>
					</view>
				</view>
				<view class="with_danpinID" v-else>

					<image :src="storeinfo.logo" mode=""></image>
					<view class="with_danpinID_item">
						<text>{{storeinfo.name}}</text>
						<!-- <text>店铺地址:{{storeinfo.address}}</text> -->
						<text>店铺地址:{{zitiaddress}}</text>
					</view>


				</view>
				<view class="" style="color: #ED2920;" @click="changeziti">
					<text>切换自提点</text>
				</view>
				<view class="address-right" v-if="!danpinid">
					<view class="radio">
						<view :class="`radio-item ${tiqi===1?'active':''}`" @click="handleCheckTitiqi(1)">
							配送
						</view>
						<view :class="`radio-item ${tiqi===2?'active':''}`" @click="handleCheckTitiqi(2)">
							自提
						</view>
					</view>
				</view>
			</view>

			<view class="goods">
				<view class="tit">
					订单商品
				</view>
				<view class="goods-info">
					<view class="info-item" v-for="(item,index) in goodsList" :key="index">
						<view class="info-left">
							<image class="img" :src="item.goodimage[0]" mode=""></image>
						</view>
						<view class="info-right">
							<view class="name">
								{{item.goodname}}
							</view>
							<view class="desc">
								{{item.guige}}
							</view>

							<view class="priceandnum">
								<view class="price">
									<view class="">
										￥
									</view>
									<view class="val">
										{{item.price}}
									</view>
								</view>
								<view class="num">
									×{{item.num}}
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="youhui">
				<view class="youhui-item" @click="handleShowCoupon">
					<view class="name">
						优惠券
					</view>
					<view class="val">
						<view class="have" v-if="couponList.length">
							<view class="cpuponval" v-if="selectCoupon">
								-{{formatNumber(selectCoupon.price)}}
							</view>
							<view class="slec" v-else>
								请选择
							</view>
							<u-icon name="arrow-right" color="#2E2D2D" size="13"></u-icon>
						</view>
						<view class="none" v-else>
							暂无可用优惠券
						</view>

					</view>
				</view>
				<view class="youhui-item">
					<view class="name">
						配送费
					</view>
					<view class="val numval">
						00.00
					</view>
				</view>
			</view>
			<view class="jiage">
				<view class="tit">
					价格明细
				</view>
				<view class="jiage-item">
					<view class="label">
						商品总额
					</view>
					<view class="val">
						<view class="price">
							<view class="">
								￥
							</view>
							<view class="val">
								{{formatNumber(goodsPrice)}}
							</view>
						</view>
					</view>
				</view>
				<view class="jiage-item">
					<view class="label">
						配送费
					</view>
					<view class="val">
						<view class="price">
							<view class="">
								￥
							</view>
							<view class="val">
								{{formatNumber(yunfei)}}
							</view>
						</view>
					</view>
				</view>
				<view class="jiage-item">
					<view class="label">
						优惠券优惠
					</view>
					<view class="val">
						<view class="price red">
							<view class="">
								-￥
							</view>
							<view class="val ">
								{{formatNumber(selectCoupon?.price||0)}}
							</view>
						</view>
					</view>
				</view>
				<view class="jiage-item">
					<view class="label">
						应付款
					</view>
					<view class="val">
						<view class="price red">
							<view class="">
								￥
							</view>
							<view class="val ">
								{{formatNumber(totalPrice)}}
							</view>
						</view>
					</view>
				</view>

			</view>


			<view class="zffs">
				<view class="label">
					支付方式
				</view>
				<view class="val">
					<view class="fs" @click="checkPayMethod(2)" v-if="isWechat">
						<view class="fs-left">
							<view class="icon">
								<image class="icon-img" src="../../static/images/wxpay.png" mode=""></image>
							</view>
							<view class="text">
								微信支付
							</view>
							<view class="zhekou" v-if="wxhzekou!==100">
								{{(wxhzekou||0)/100===1?0:((wxhzekou||0)/100)*10}}折
							</view>
							<view class="shifu">
								<view class="label">
									实付：
								</view>
								<view class="price">
									￥{{wxprice}}
								</view>
							</view>
						</view>
						<view class="fs-right">
							<image class="img-cont" v-if="payMethod===2" src="../../static/images/checked.png" mode="">
							</image>
							<image v-else class="img-cont" src="../../static/images/check.png" mode=""></image>

						</view>

					</view>
					<view class="fs" @click="checkPayMethod(1)">
						<view class="fs-left">
							<view class="icon">
								<image class="icon-img" src="../../static/images/yepay.png" mode=""></image>
							</view>
							<view class="text">
								余额支付
							</view>
							<view class="zhekou" v-if="yuezekou!==100">
								{{(yuezekou||0)/100===1?0:((yuezekou||0)/100)*10}}折
							</view>
							<view class="shifu">
								<view class="label">
									实付：
								</view>
								<view class="price">
									￥{{yueprice}}
								</view>

							</view>
						</view>
						<view class="fs-right">
							<image class="img-cont" v-if="payMethod===1" src="../../static/images/checked.png" mode="">
							</image>
							<image v-else class="img-cont" src="../../static/images/check.png" mode=""></image>
						</view>

					</view>
					<view class="fs" @click="checkPayMethod(3)" v-if="isDaodian">
						<view class="fs-left">
							<view class="icon">
								<image class="icon-img" src="../../static/images/yepay.png" mode=""></image>
							</view>
							<view class="text">
								到店支付
							</view>

						</view>
						<view class="fs-right">
							<image class="img-cont" v-if="payMethod===3" src="../../static/images/checked.png" mode="">
							</image>
							<image v-else class="img-cont" src="../../static/images/check.png" mode=""></image>
						</view>

					</view>


				</view>
			</view>
			<view class="beizhu">
				<view class="tit">
					备注
				</view>
				<view class="beizhucont">
					<u--textarea v-model="beizhu" placeholder="请输入备注"></u--textarea>
				</view>
			</view>
		</view>

		<view class="footer">
			<view class="left">
				实付款
				<view class="price">
					<view class="">
						￥
					</view>
					<view class="val">
						{{formatNumber(meetPrice)}}
					</view>
				</view>
			</view>
			<view class="right">
				<view class="btn" @click="handlePlayOrder">
					提交订单
				</view>
			</view>
		</view>
		<u-popup :round="20" :show="showCoupon" @close="handleCloseCoupon">
			<view class="conponCont">
				<view class="top">
					<view class="tit">
						<view class="text">
							优惠券
						</view>
						<view class="close" @click="handleCloseCoupon">
							<u-icon name="close" color="#CCCCCC" size="16"></u-icon>
						</view>
					</view>
					<!-- <view class="check">
						<view @click="handleCheckCoupon(1)" :class="`check-item ${couponActive==1?'active-check':''}`">
							可用优惠券
						</view>
						<view @click="handleCheckCoupon(2)" :class="`check-item ${couponActive==2?'active-check':''}`">
							不可用优惠券
						</view>
					</view> -->
				</view>
				<view class="info">
					<view class="have">
						<view class="coupon-item" v-for="(item,index) in couponList" :key="index"
							@click="handleSelectziti(item)">
							<view class="item-info">
								<view class="bgcoupon">
									<image class="img" src="../../static/images/couponBlue.png" mode=""></image>
								</view>
								<view class="info-inner">
									<view class=" left-box">
										<view class="coupon-num-box">{{item.price}} <text>元</text> </view>
										<view class="coupon-rule">满{{item.fullprice}}元使用</view>
									</view>
									<view class="middle">
										<view class="ctop">
											<view class="coupon-title">{{item.name}}</view>

										</view>
										<view class="desc">
											{{item.title}}
										</view>

									</view>
									<view class="right" v-if="goodsPrice >= item.fullprice">
										<view class="check">
											<image v-if="selectCoupon.id!==item.id" class="img-cont"
												src="../../static/images/check.png" mode=""></image>
											<image v-if="selectCoupon.id===item.id" class="img-cont"
												src="../../static/images/checked.png" mode=""></image>
										</view>
									</view>
								</view>
							</view>
							<view class="">

							</view>
						</view>

					</view>
				</view>
			</view>
		</u-popup>

		<u-popup :round="20" :show="zitipop" @close="handlezitipop">
			<view class="conponCont">
				<view class="top">
					<view class="tit">
						<view class="text">
							切换自提点
						</view>
						<view class="close" @click="handlezitipop">
							<u-icon name="close" color="#CCCCCC" size="16"></u-icon>
						</view>
					</view>
				</view>
				<view class="info">
					<view class="have">
						<view class="coupon-item" v-for="(item,index) in zitiList" :key="index"
							@click="handleSelectziti(item)">
							<view class="item-info" style="background-color: #fff;">
								<!-- <view class="bgcoupon">
									<image class="img" src="../../static/images/couponBlue.png" mode=""></image>
								</view> -->
								<view class="info-inner">
									<view class="left-box">
										<view class="">{{item.address}}</view>
										<!-- <view class="coupon-rule">满元使用</view> -->
									</view>
									<view class="middle">
										<!-- <view class="ctop">
											<view class="coupon-title">xx</view>

										</view>
										<view class="desc">
											xx
										</view> -->

									</view>
									<view class="right">
										<view class="check">
											<image v-if="selectziti!==item.id" class="img-cont"
												src="../../static/images/check.png" mode=""></image>
											<image v-if="selectziti===item.id" class="img-cont"
												src="../../static/images/checked.png" mode=""></image>
										</view>
									</view>
								</view>
							</view>
							<view class="">

							</view>
						</view>

					</view>
				</view>
			</view>
		</u-popup>
		<u-datetime-picker :show="showTime" v-model="slectTime" @confirm="timeConfirm" mode="time"
			@cancel="handleCloseTime"></u-datetime-picker>
	</view>

</template>

<script setup>
	import formatNumber from '@/utils/formatNumber.js'
	import handleCache from "@/utils/cache.js"
	import dayjs from 'dayjs'
	import _ from 'lodash'
	import {
		ref,
		computed
	} from 'vue'
	import {
		onReady,
		onShow,
		onLoad
	} from '@dcloudio/uni-app'
	import {
		couponApi,
		goodsApi,
		addressApi,
		orderApi,
		quickSaleApi,
		storeApi,
		commonApi,
	} from '../../api';
	const slectTime = ref('')

	const showTime = ref(false)
	const beizhu = ref('')
	const shname = ref('')
	const tiqi = ref(1)
	const pstime = ref('')
	const lijiTime = ref('')
	const cartids = ref('')
	const goodsList = ref([])
	const yunfei = ref(0)
	const couponPrice = ref(0)
	const address = ref('')
	const isSelectAddress = ref(false)
	const showCoupon = ref(false)

	const selectCoupon = ref('')
	const couponList = ref([])
	const userInfo = ref('')
	const orderId = ref('')
	const orderInfo = ref('')
	const payMethod = ref(2)
	const danpinid = ref('')
	let wxhzekou = ref(100)
	let yuezekou = ref(100)
	const storeinfo = ref([])
	const userwallet = ref('')
	const isWechat = ref(false)
	const originprice = ref('')
	const isDaodian = ref(true)
	const zitiList = ref([])
	const zitipop = ref(false)
	const selectziti = ref();
	const selectziti_item = ref();
	const zitiaddress = ref()
	// let wxprice = ref(0)
	// let yueprice = ref(0)
	onShow(async () => {
		lijipei()
		userInfo.value = handleCache.get('userInfo')
	})
	onLoad(async (options) => {
		if (options.carId) {
			cartids.value = options.carId
			await getAddress()
			await buyGoodsInfo()
			await getCoupon()
			getStoreInfo()
			getuserwallet()
		}
		if (options.orderId) {
			console.log('xxxxxxxxxxxxxxxxxx')
			orderId.value = Number(options.orderId)
			await buyOrderInfo()
			await getAddress()
			await getCoupon()
			getStoreInfo()
			getuserwallet()
			isDaodian.value = false
			payMethod.value = 1
		}
		if (options.danpinid) {
			danpinid.value = Number(options.danpinid)
			tiqi.value = 2
			await getCoupon()
			getStoreInfo()
			getdanpinInfo()
			getuserwallet()

		}
		getziti_list()
	})
	let totalPrice = computed(() => {
		let price = 0
		if (goodsList.value.length) {
			goodsList.value.forEach((item) => {
				let num = _.multiply(item.price, item.num)
				price = _.add(price, num)
			})
			if (selectCoupon.value.price) {
				price = _.subtract(price, selectCoupon.value.price)
			}
		}

		return price
	})


	const goodsPrice = computed(() => {
		let price = 0
		if (goodsList.value.length) {
			goodsList.value.forEach((item) => {
				let num = _.multiply(item.price, item.num)
				price = _.add(price, num)
			})
		}
		return price
	})

	let meetPrice = computed(() => {
		if (payMethod.value === 1) {
			return yueprice.value
		} else if (payMethod.value === 2) {
			return wxprice.value
		} else if (payMethod.value === 3) {
			return originprice.value
		}
		// return payMethod.value === 1 ? yueprice.value : wxprice.value
	})
	let wxprice = computed(() => {
		let total
		let allprice = _.add(totalPrice.value, yunfei.value)
		let price = allprice
		console.log(allprice, selectCoupon.value.price, 99977766)
		let t = wxhzekou.value || 100
		let zhe = t / 100
		let v = _.multiply(price, zhe)

		price = Math.floor(v * 100) / 100
		return price
	})
	let yueprice = computed(() => {
		let total
		let allprice = _.add(totalPrice.value, yunfei.value)
		let price = allprice
		let t = yuezekou.value || 100
		let zhe = t / 100
		let v = _.multiply(price, zhe)
		price = Math.floor(v * 100) / 100
		return price
	})

	// 获取自提点列表
	const getziti_list = () => {
		// addressApi.zitilist({
		// 	shanghuid: userInfo.value.shanghuid
		// }).then((res) => {
		// 	zitiList.value=res.data.data
		// })

		let req = {
			shanghuid: userInfo.value.shanghuid
		}
		addressApi.zitilist(req).then((res) => {
			zitiList.value = res.data;
			console.log('res.data.datdxxxxxxxxxxxxxx', res.data)
		})
	}

	const changeziti = () => {
		zitipop.value = true;
	}
	// 自提点选择方法
	const handleSelectziti = (data) => {
		console.log('zzzzzzz', data)
		selectziti.value = data.id;
		selectziti_item.value =data;
		if (selectziti.value = data.id) {
			zitipop.value = false;
			zitiaddress.value = data.address;
		}
	}

	const handlezitipop = () => {
		zitipop.value = false;
	}
	const lijipeisong = () => {
		lijipei()
		pstime.value = ''
	}
	const handleShowTime = () => {
		showTime.value = true

		slectTime.value = dayjs().format('HH:mm')

	}
	const handleCloseTime = () => {
		showTime.value = false
	}
	const timeConfirm = (data) => {
		var date = new Date();
		let a = data.value.split(":")
		let b = dayjs().format('HH:mm').split(":")

		let flag = date.setHours(a[0], a[1]) < date.setHours(b[0], b[1])
		console.log(flag)
		if (flag) {
			uni.showToast({
				icon: 'none',
				title: '不能小于当前时间'
			})
		} else {
			pstime.value = data.value
			showTime.value = false
		}
	}

	const checkPayMethod = (data) => {
		console.log('data', data)
		if (data === payMethod.value) {
			return
		}
		payMethod.value = data;
	}
	const getdanpinInfo = async () => {
		let {
			data
		} = await quickSaleApi.danpininfo({
			id: danpinid.value
		})
		originprice.value = data.price;
		console.log('data', data)

		var links = data.image.split(",");
		data.image = links;

		console.log('data', data)

		goodsList.value = [{
			goodname: data.name,
			price: data.price,
			goodimage: data.image,
			num: 1
		}]

	}
	const getStoreInfo = () => {
		storeApi.storeinfo({
			id: userInfo.value.shanghuid
		}).then((res) => {
			if (res.data.paystatus == 1 && res.data.shh != '') {
				isWechat.value = true;
				payMethod.value = 2;
			} else if (res.data.paystatus == 2) {
				isWechat.value = true;
				payMethod.value = 2;
			} else if (res.data.paystatus == 3) {
				payMethod.value = 3;
			}

			storeinfo.value = res.data
			zitiaddress.value =  res.data.address
			shname.value = res.data.name
			wxhzekou.value = res?.data?.wxzhekou || 100

		})
	}
	const getuserwallet = () => {
		let req = {
			uid: userInfo.value.id,
			shanghuid: userInfo.value.shanghuid
		}
		commonApi.userwallet(req).then((res) => {
			userwallet.value = res.data
			yuezekou.value = res?.data?.zhekou || 100
		})
	}
	const getCoupon = () => {
		let req = {
			uid: userInfo.value.id,
			shanghuid: userInfo.value.shanghuid,
			status: 1
		}
		couponApi.couponuser(req).then((res) => {
			couponList.value = res.data || []
			if (couponList.value.length) {
				// couponList.value = couponList.value.filter((item) => totalPrice.value >= item.fullprice)
				if (couponList.value.length && orderInfo.value.couponid) {
					let coupinId = orderInfo.value.couponid
					let a = couponList.value.find(item => item.couponid === coupinId)
					if (a) {
						selectCoupon.value = a
					}
				}
			}
		})


	}
	const handleShowCoupon = () => {
		if (couponList.value.length) {
			showCoupon.value = true
		}

	}
	const handleCloseCoupon = () => {
		showCoupon.value = false
	}
	const handleSelectCoupon = (data) => {
		if (data.id === selectCoupon.value.id) {
			selectCoupon.value = ''
			showCoupon.value = false
			return
		}
		if (goodsPrice.value >= data.fullprice) {
			selectCoupon.value = data
			showCoupon.value = false
		}

	}

	const lijipei = () => {
		var date = new Date(); //1. js获取当前时间
		var min = date.getMinutes(); //2. 获取当前分钟
		date.setMinutes(min + 20); //3. 设置当前时间+10分钟：把当前分钟数+10后的值重新设置为date对象的分钟数
		var h = date.getHours() < 10 ? ('0' + date.getHours()) : date.getHours()
		var f = date.getMinutes() < 10 ? ('0' + date.getMinutes()) : date.getMinutes()
		var formatdate = h + ":" + f;
		lijiTime.value = formatdate

	}
	const handleCheckTitiqi = (data) => {
		tiqi.value = data
	}
	const handleGoselectAddress = () => {
		uni.navigateTo({
			url: '/pages/address/address?type=select'
		})
	}

	const buyGoodsInfo = async () => {
		let req = {
			cartids: cartids.value
		}
		let {
			data
		} = await goodsApi.goodcartxzlist(req)
		goodsList.value = data
	}
	const buyOrderInfo = async () => {
		let req = {
			orderid: orderId.value
		}
		let {
			data
		} = await orderApi.orderinfo(req)
		goodsList.value = data.List || []
		tiqi.value = data.tiqi
		orderInfo.value = data
		beizhu.value = data.beizhu
	}
	const getAddress = async () => {
		let {
			data: cdata
		} = await addressApi.areadefault({
			uid: userInfo.value
		})
		if (cdata.id && !orderId.value) {
			if (!isSelectAddress.value) {
				address.value = cdata
			}
		} else {
			let {
				data
			} = await addressApi.addrlist({
				uid: userInfo.value.id
			})
			if (!isSelectAddress.value) {
				if (data.length) {
					if (!orderId.value) {
						address.value = data[0]
					} else {
						let orderAddressId = orderInfo.value.addressid
						if (data.length) {
							let a = data.find(item => item.id === orderAddressId)
							if (a) {
								address.value = a
							} else {
								address.value = data[0]
							}

						}
					}

				}
			}
		}


	}
	const setSelectAddress = (data) => {

		address.value = data
		isSelectAddress.value = true
	}

	const handlePlayOrder = () => {
		console.log('xxxxxxxxxxzzzzzzzzzzzzzzzzz',address.value)
		// if (!address.value && tiqi.value === 1) {
		if (!zitiaddress.value && tiqi.value === 1) {
			uni.showToast({
				icon: 'none',
				mask: true,
				title: '请选择地址'
			})
			return
		}
		if (payMethod.value === 1 && meetPrice.value > userwallet.value.price) {
			uni.showModal({
				title: '余额不足', // 标题
				content: '是否前往充值', // 提示内容
				cancelText: "取消", // 取消按钮的文字
				confirmText: "确认", // 确认按钮的文字
				showCancel: true, // 是否显示取消按钮，默认为 true
				success(res) {
					if (res.confirm) {
						//点击确定之后执行的代码
						uni.navigateTo({
							url: '/pagesA/recharge/recharge?type=1'
						})
					} else {
						//点击取消之后执行的代码
					}
				}
			});

			return
		}
		let req = {
			addressid: address.value.id,
			uid: userInfo.value.id,
			tiqi: tiqi.value,
			shanghuid: userInfo.value.shanghuid,
			cartids: cartids.value,
			couponid: selectCoupon.value?.couponid || '',
			beizhu: beizhu.value,
			shanghu: userInfo.value.shanghuname,
			state: payMethod.value,
			pstime: pstime.value || lijiTime.value,
			zitidian:zitiaddress.value
		}

		uni.showLoading({
			title: '正在生成订单',
			mask: true
		})


		if (!orderInfo.value) {
			if (danpinid.value) {
				req.goodid = danpinid.value
				delete req.addressid
				delete req.cartids
				orderApi.ordergdanpin(req).then((res) => {
					uni.hideLoading()
					if (res.code === 0) {
						if (payMethod.value === 2) {
							goPay(res.data)
						} else if (payMethod.value === 3) {
							uni.redirectTo({
								url: '/pages/payresult/payresult?status=1'
							})
						} else {
							uni.redirectTo({
								url: '/pages/payresult/payresult?status=1'
							})
						}

					} else {
						uni.showToast({
							title: res.data,
							icon: 'none',
							mask: true
						})
					}
				})
			} else {
				orderApi.ordergenerate(req).then((res) => {
					uni.hideLoading()
					if (res.code === 0) {
						if (payMethod.value === 2) {
							goPay(res.data)
						} else {
							uni.redirectTo({
								url: '/pages/payresult/payresult?status=1'
							})
						}
					} else {
						uni.showToast({
							title: res.data,
							icon: 'none',
							mask: true
						})
					}
				})
			}

		} else {
			req.id = orderId.value
			orderApi.orderupdate(req).then((res) => {
				uni.hideLoading()
				if (res.code === 0) {
					goPay(res.data)
				} else {
					uni.showToast({
						title: res.data,
						icon: 'none',
						mask: true
					})
				}
			})
		}


	}
	const goPay = (data) => {
		console.log('xxxxxxxxxxx嗷嗷嗷嗷嗷嗷嗷嗷嗷嗷',typeof(data))
		orderApi.wechatpayorder({
			id: data
		}).then((res) => {
			if (res.code === 0) {
				let paydata = res.data
				wx.requestPayment({
					nonceStr: paydata.nonceStr, // 随机字符串
					package: paydata.package, // 固定值
					signType: paydata.signType, // 统一下单订单号 
					timeStamp: paydata.timeStamp, // 时间戳（单位：秒）
					paySign: paydata.sign, // 签名，这里用的 MD5/RSA 签名
					success(res) {
						uni.redirectTo({
							url: '/pages/payresult/payresult?status=1'
						})
					},
					fail(e) {
						uni.redirectTo({
							url: '/pages/payresult/payresult?status=0'
						})
						console.log(e, 8888)
					}
				})
			}
		})
	}


	defineExpose({
		setSelectAddress
	})
</script>

<style lang="scss" scoped>
	@import 'index.scss';

	.with_danpinID {
		display: flex;
	}

	.with_danpinID image {
		width: 120rpx;
		height: 120rpx;

	}

	.with_danpinID_item {
		display: flex;
		flex-direction: column;
		justify-content: space-around;
		margin-left: 20rpx;
	}

	.with_danpinID_item text:first-child {
		font-size: 30rpx;
		font-weight: 700;
	}

	.with_danpinID_item text:nth-child(2) {
		font-size: 26rpx;
		color: #a6a6a6;
	}
</style>